package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 推演工程表
 * @TableName disposition_wq_tygc
 */
@TableName(value ="disposition_wq_tygc")
@Data
public class DispositionWqTygc implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 推演名称
     */
    @TableField(value = "derivation_name")
    private String derivationName;

    /**
     * 推演开始时间
     */
    @TableField(value = "derivation_start_time")
    private String derivationStartTime;

    /**
     * 推演结束时间
     */
    @TableField(value = "serivation_end_time")
    private String serivationEndTime;

    /**
     * 关联的方案计划
     */
    @TableField(value = "plan_proposal")
    private String planProposal;

    /**
     * 说明
     */
    @TableField(value = "explanation")
    private String explanation;

    /**
     * 推演状态
     */
    @TableField(value = "procedural_state")
    private String proceduralState;

    /**
     * 当前运行时长
     */
    @TableField(value = "current_running_duration")
    private String currentRunningDuration;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqTygc other = (DispositionWqTygc) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDerivationName() == null ? other.getDerivationName() == null : this.getDerivationName().equals(other.getDerivationName()))
            && (this.getDerivationStartTime() == null ? other.getDerivationStartTime() == null : this.getDerivationStartTime().equals(other.getDerivationStartTime()))
            && (this.getSerivationEndTime() == null ? other.getSerivationEndTime() == null : this.getSerivationEndTime().equals(other.getSerivationEndTime()))
            && (this.getPlanProposal() == null ? other.getPlanProposal() == null : this.getPlanProposal().equals(other.getPlanProposal()))
            && (this.getExplanation() == null ? other.getExplanation() == null : this.getExplanation().equals(other.getExplanation()))
            && (this.getProceduralState() == null ? other.getProceduralState() == null : this.getProceduralState().equals(other.getProceduralState()))
            && (this.getCurrentRunningDuration() == null ? other.getCurrentRunningDuration() == null : this.getCurrentRunningDuration().equals(other.getCurrentRunningDuration()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDerivationName() == null) ? 0 : getDerivationName().hashCode());
        result = prime * result + ((getDerivationStartTime() == null) ? 0 : getDerivationStartTime().hashCode());
        result = prime * result + ((getSerivationEndTime() == null) ? 0 : getSerivationEndTime().hashCode());
        result = prime * result + ((getPlanProposal() == null) ? 0 : getPlanProposal().hashCode());
        result = prime * result + ((getExplanation() == null) ? 0 : getExplanation().hashCode());
        result = prime * result + ((getProceduralState() == null) ? 0 : getProceduralState().hashCode());
        result = prime * result + ((getCurrentRunningDuration() == null) ? 0 : getCurrentRunningDuration().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", derivationName=").append(derivationName);
        sb.append(", derivationStartTime=").append(derivationStartTime);
        sb.append(", serivationEndTime=").append(serivationEndTime);
        sb.append(", planProposal=").append(planProposal);
        sb.append(", explanation=").append(explanation);
        sb.append(", proceduralState=").append(proceduralState);
        sb.append(", currentRunningDuration=").append(currentRunningDuration);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}